function search(e) {
    if (e.key === 'Enter') {
        to(`${window.location.origin}${window.location.pathname}?keyword=${e.path[0].value}`)
    }
}

const market = new buildPage({
    dom: '#market',
    data: {
        searchForm: {
            keyword: '',
            page: 1
        }
    },
    beforeAction() {
        Reflect.set(
            this.data.searchForm,
            'keyword',
            getUrlParams('keyword')
        )
    },
    methods: {
    }
}).use({
    stateX
}).mount()
